home *** CD-ROM | disk | FTP | other *** search
/ Alles Voor Internet / Tout Pour Internet / alles voor internet.iso / MacInternet™ / Telnet / NCSA / tn3270 2.4d7 source / NCSA⁄BYU TCP⁄IP / atalk.h < prev    next >
Text File  |  1991-06-27  |  2KB  |  75 lines

  1. /*
  2.  * atalk.h - AppleTalk conversion structures.....
  3.  */
  4.  
  5. #define ATADDLEN    4
  6. #define ATHTYPE        3            /* AppleTalk type */
  7.  
  8. unsigned char ATbseed[] = {0x00,0x00,0xff,0x48};
  9.         /* use this when bseed[] is used for enet */
  10.  
  11. /*
  12.  * AppleTalk Listener Interface structure
  13.  */
  14.  
  15. #define    AIP        22
  16. #define AARP    23
  17. #define IPSock    72                     /* Later Change to random */
  18.  
  19. struct aTalk {
  20.     short    count;
  21.     unsigned char
  22.             dest[ATADDLEN],    /* where the packet is going */
  23.              me[ATADDLEN],
  24.             type, paddingchars[3];        /* Give an even length so we will be at even */
  25.     };
  26.  
  27. typedef struct aTalk ATdlayer;
  28.  
  29.  
  30. /*
  31.  * Here is the ARP packet structure  -  ATplummer
  32.  */
  33.  
  34. struct ATplummer {
  35.     ATdlayer d;                 /* data link layer packet header */
  36.  
  37.     unsigned short hrd,            /* hardware type, Ethernet = 1 */
  38.             pro;            /* protocol type to resolve for */
  39.     unsigned char    
  40.             hln,            /* byte length of hardware addr = 6 for ETNET */
  41.             pln;            /* byte length of protocol = 4 for IP */
  42.     unsigned short op;            /* opcode, request = 1, reply = 2, RARP = 3,4 */
  43.     unsigned char
  44.             sha[ATADDLEN],
  45.             spa[4],
  46.             tha[ATADDLEN],
  47.             tpa[4];
  48. /*
  49. *   the final four fields (contained in 'rest') are:
  50. *      sender hardware address:   sha       hln bytes
  51. *      sender protocol address:   spa       pln bytes
  52. *      target hardware address:   tha       hln bytes
  53. *      target protocol address:   tpa       pln bytes
  54. */
  55. };
  56.  
  57. typedef struct ATplummer ATARPKT;
  58.  
  59. extern void getATaddress
  60.   (
  61.     int *hi,
  62.     int *low,
  63.     int *node
  64.   );
  65.  
  66. extern int atopen
  67.   (
  68.     void
  69.   );
  70.  
  71. extern int atclose
  72.   (
  73.     void
  74.   );
  75.